<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>鸽游成本计算器</title>
        <script>
            var mode;
            var number;
            var peo;
            var calc;
            var write;
            function calcing(){
                number=document.getElementById("num").value;
                peo=document.getElementById("people").value;
                calc=Number(number);
                var peocalc=Number(peo);
                if(mode==1){
                    document.getElementById("band").innerHTML=calc*200*peocalc/1024/1024/100+"Mbps/人";
                    document.getElementById("price").innerHTML=calc*200*peocalc/1024/100/1024*1060+"元/人/月(等待0.5秒)";
                }
                else{
                    document.getElementById("band").innerHTML=calc*0.11*peocalc/500+"Mbps";
                    document.getElementById("price").innerHTML=calc*0.11*peocalc/500*1060+"元/人/月(等待5秒)";
                }
            }
        </script>
    </head>
    <body>
        <button onclick="mode=1">每首歌上传1次</button>
        <button onclick="mode=2">上传所有数据</button>
        <br/>
        <p>并发量(百分比)</p>
        <input id="num" type="number"/>
        <br/>
        <p>人数</p>
        <input id='people' type='number'/>
        <br/>
        <button onclick="calcing()">计算</button>
        <p id="band"></p>
        <br/>
        <p id="price"></p>
        <br/>
        <a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=1dPtEhO5JIBksPkTffI2rIiG2UfyjCed&jump_from=webapi">营销号吐槽群</a>
    </body>
</html>